package com.rt.cms.data.dto.company;

import com.rt.cms.common.enums.BusinessType;
import com.rt.cms.common.utils.DateUtils;
import com.rt.cms.data.entity.TbCompanyInfo;
import com.rt.cms.data.entity.TbCompayUploadInfo;

import java.util.List;

/**
 * Create with IDEA
 *
 * @author Wangzs
 * @Description
 * @Date 2018/6/5
 * @Time 14:16
 */
public class ArchivesDto {

    private int id;
    private String comName;//企业名称
    private String businessCode;//营业执照
    private int comType;//列别
    private int businessType;
    private int status;//状态
    private String inputTime;//录入时间
    private double creditLine;//授信额度
    private int creditLimit;//授信期限
    private String activeTime;//激活时间
    private String upTime;//上线时间
    private int dormant; //是否休眠
    private String picName;
    private String picURL;
    private int isDisplay;
    private int uploadId;
    private int operateId;
    private int fileOperateId;
    private int checkOperateId;
    private int msgCount;
    private int dormanyCount;
    private int waitDormanyCount;
    private String passTime;


    private String businessTypeSTR;

    private List<TbCompayUploadInfo> tbCompayUploadInfos;
    private List<ArchivesDto> archivesDtoList;


    public String getPassTime() {
        return passTime;
    }

    public void setPassTime(String passTime) {
        this.passTime = passTime;
    }

    public String getBusinessTypeSTR() {
        businessTypeSTR =  BusinessType.getByNum(businessType);
        return businessTypeSTR;
    }

    public int getUploadId() {
        return uploadId;
    }

    public void setUploadId(int uploadId) {
        this.uploadId = uploadId;
    }

    public List<ArchivesDto> getArchivesDtoList() {
        return archivesDtoList;
    }

    public void setArchivesDtoList(List<ArchivesDto> archivesDtoList) {
        this.archivesDtoList = archivesDtoList;
    }

    public int getIsDisplay() {
        return isDisplay;
    }

    public void setIsDisplay(int isDisplay) {
        this.isDisplay = isDisplay;
    }

    public int getBusinessType() {
        return businessType;
    }

    public void setBusinessType(int businessType) {
        this.businessType = businessType;
    }

    public int getFileOperateId() {
        return fileOperateId;
    }

    public void setFileOperateId(int fileOperateId) {
        this.fileOperateId = fileOperateId;
    }

    public ArchivesDto(TbCompanyInfo company) {

        this.id = company.getId();
        this.comName = company.getComName();
        this.businessCode = company.getBusinessCode();
        this.comType = company.getComType();
        this.businessType = company.getBusinessType();
        this.status = company.getStatus();
        this.creditLimit = company.getCreditLimit();
        this.dormant = company.getDormant();
        this.creditLine = company.getCreditLine();
        this.operateId = company.getOperateId();
        this.fileOperateId = company.getFileOperateId();
        this.checkOperateId = company.getCheckOperateId();
        this.activeTime = company.getActiveTime() == null ? null : DateUtils.formatDateTime(company.getActiveTime());
        this.upTime = company.getUpTime() == null ? null : DateUtils.formatDateTime(company.getUpTime());
        this.passTime = company.getPassTime() == null ? null : DateUtils.formatDateTime(company.getPassTime());
        this.inputTime = company.getInputTime() == null ? null : DateUtils.formatDateTime(company.getInputTime());
    }

    public String getPicName() {
        return picName;
    }

    public void setPicName(String picName) {
        this.picName = picName;
    }

    public String getPicURL() {
        return picURL;
    }

    public void setPicURL(String picURL) {
        this.picURL = picURL;
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getComName() {
        return comName;
    }

    public void setComName(String comName) {
        this.comName = comName;
    }

    public String getBusinessCode() {
        return businessCode;
    }

    public void setBusinessCode(String businessCode) {
        this.businessCode = businessCode;
    }


    public int getComType() {
        return comType;
    }

    public void setComType(int comType) {
        this.comType = comType;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getInputTime() {
        return inputTime;
    }

    public void setInputTime(String inputTime) {
        this.inputTime = inputTime;
    }

    public double getCreditLine() {
        return creditLine;
    }

    public void setCreditLine(double creditLine) {
        this.creditLine = creditLine;
    }

    public int getCreditLimit() {
        return creditLimit;
    }

    public void setCreditLimit(int creditLimit) {
        this.creditLimit = creditLimit;
    }

    public String getActiveTime() {
        return activeTime;
    }

    public void setActiveTime(String activeTime) {
        this.activeTime = activeTime;
    }

    public String getUpTime() {
        return upTime;
    }

    public void setUpTime(String upTime) {
        this.upTime = upTime;
    }

    public int getDormant() {
        return dormant;
    }

    public void setDormant(int dormant) {
        this.dormant = dormant;
    }

    public List<TbCompayUploadInfo> getTbCompayUploadInfos() {
        return tbCompayUploadInfos;
    }

    public void setTbCompayUploadInfos(List<TbCompayUploadInfo> tbCompayUploadInfos) {
        this.tbCompayUploadInfos = tbCompayUploadInfos;
    }

    public ArchivesDto() {
    }

    public int getMsgCount() {
        return msgCount;
    }

    public void setMsgCount(int msgCount) {
        this.msgCount = msgCount;
    }

    public int getDormanyCount() {
        return dormanyCount;
    }

    public void setDormanyCount(int dormanyCount) {
        this.dormanyCount = dormanyCount;
    }

    public int getCheckOperateId() {
        return checkOperateId;
    }

    public void setCheckOperateId(int checkOperateId) {
        this.checkOperateId = checkOperateId;
    }

    public int getOperateId() {
        return operateId;
    }

    public void setOperateId(int operateId) {
        this.operateId = operateId;
    }

    public int getWaitDormanyCount() {
        return waitDormanyCount;
    }

    public void setWaitDormanyCount(int waitDormanyCount) {
        this.waitDormanyCount = waitDormanyCount;
    }
}
